import request from '@/router/axios';

// 列表
export const getList = (current, size, params) => {
    return request({
        url: '/api/riskIdentification/hazopriskanalysis/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

// 删除
export const remove = (ids) => {
    return request({
        url: '/api/riskIdentification/hazopriskanalysis/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}

// 新增
export const add = (row) => {
    return request({
        url: '/api/riskIdentification/hazopriskanalysis/save',
        method: 'post',
        data: row
    })
}

// 编辑
export const update = (row) => {
    return request({
        url: '/api/riskIdentification/hazopriskanalysis/update',
        method: 'post',
        data: row
    })
}

// 删除HAZOP风险活动
export const removeRiskActivity = (ids) => {
    return request({
        url: '/api/riskIdentification/hazopriskactivity/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}

// 获取引导词列表
export const getIntroducers = () => {
    return request({
        url: '/api/blade-system/dict-biz/dictionary?code=guide_word',
        method: 'get'
    })
}

// 获取执行人列表
export const getExecutors = () => {
    return request({
        url: '/api/riskPoint/riskmanagement/getInternalStaff',
        method: 'get'
    })
}